package com.github.xuejike.springboot.generator;

import com.baomidou.mybatisplus.generator.config.rules.IColumnType;

public class FullNameColumnType  implements IEnumColumnType {
    private String fullName;
    private String type;
    private String pkg;
    private boolean isEnum = false;

    public FullNameColumnType(String fullName) {
        this.fullName = fullName;
        int i = fullName.lastIndexOf(".");
        pkg = fullName;
        type = fullName.substring(i+1);
    }

    public void setEnum(boolean anEnum) {
        isEnum = anEnum;
    }

    @Override
    public String getType() {
        return type;
    }

    @Override
    public String getPkg() {
        return pkg;
    }

    @Override
    public boolean isEnum() {
        return isEnum;
    }
}
